
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<%@ page import="com.scalar.chiptrack.utils.ConfigManager,
				 java.util.ArrayList" %>
<%@ page import="com.scalar.chiptrack.users.Functionality"%>
<%@ page import="com.scalar.chiptrack.users.User"%>
<%@ page import="com.scalar.chiptrack.commons.Constants"%>
<%@ page import="com.scalar.chiptrack.operations.tapereel.TapeReelRequest" %>

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/chiptrack-tags.tld" prefix="chiptrack" %>
<%@ taglib uri="/WEB-INF/struts-nested.tld" prefix="nested" %>

<chiptrack:checkLogon sourcePage="/tapeReelRequest.do"/>

<%String chipTracContext = "/" + ConfigManager.getChipTracContext();%>
<HTML>
<HEAD><TITLE>Scalarsoft - ChipTrac</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<LINK href="<%=chipTracContext%>/jsp/includes/stylesheets/scalarsoft.css" type="text/css" rel="stylesheet">
<script src="<%=chipTracContext%>/jsp/includes/scripts/functions.js"></script>
<script src="<%=chipTracContext%>/jsp/includes/scripts/validations.js"></script>

<script language="javascript">

function openCalendar(dateValue)
{
    dateElement = dateValue;
	newWindow = window.open('<%=chipTracContext%>/jsp/includes/calendar.html','optionsPopup','channelmode=no,directories=no,toolbar=no,menubar=no,personalbar=no,status=no,scrollbars=no,width=180,height=440,resizable=no');
	newWindow.moveTo(550,180);
	newWindow.focus();
}

function assignDate(passedValue)
{
	dateElement.value=passedValue;
	window.focus();
}

function confirmTapeReelRequest()
{
    document.tapeReelRequestForm.action = '<%=chipTracContext%>/tapeReelRequest.do?action=confirm';
    document.tapeReelRequestForm.submit();
}

function closeTapeReelRequest()
{
    document.tapeReelRequestForm.action='<%=chipTracContext%>/tapeReelRequest.do?action=close&isClosed=true';
    document.tapeReelRequestForm.submit();
}

function cancelTapeReelRequest()
{
    document.tapeReelRequestForm.action='<%=chipTracContext%>/tapeReelRequest.do?action=cancel&isCancelled=true';
    document.tapeReelRequestForm.submit();
}
        

function editTapeReelRequest()
{
    document.tapeReelRequestForm.action = '<%=chipTracContext%>/tapeReelRequest.do?action=<%=Constants.ACTION_EDIT%>';
    document.tapeReelRequestForm.submit();
}

</script>
</HEAD>
<BODY bgColor=#ffffff leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">
<!-- Top Header Start-->
<%@ include file="/jsp/includes/header.jsp" %>
<!-- Top Header End-->
<TABLE cellSpacing=0 cellPadding=0 width="100%" border="0">
    <TR>
	    <td width='180' valign='top' background='<%=chipTracContext%>/jsp/includes/images/left_red_bg.gif'>
            <!-- Side Navigation start -->
            <%
				if( user.getUserType() == 0 )
				{
			%>
            <%@ include file="/jsp/operations/releaseMenu.jsp" %>
			<%
				}
				else
				{
			%>
			<%@ include file="/jsp/admin/externaluser_menu.jsp" %>
			<%
				}	
			%>
            <!-- end of the side navigations -->
        </td>
        <TD bgcolor="#ffffff"><IMG height=9 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=8></TD>
        <TD bgcolor="#ffffff"><IMG height=480 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=2></TD>
        <TD valign="top" width="100%">
            <IMG height=1 src="<%=chipTracContext%>/jsp/includes/images/clear.gif" width=500 border=0>
            <BR>
            <html:form name="tapeReelRequestForm" type="com.scalar.chiptrack.operations.tapereel.forms.TapeReelRequestForm" action="/tapeReelRequest">
            <nested:nest property="tapeReelRequest" >
            <nested:equal property="reqStatus" value="<%=TapeReelRequest.STAUS_CANCELLED%>">
            <table border='0' cellspacing='0' cellpadding='0' width='90%' background="<%=chipTracContext%>/jsp/includes/images/cancelled_icon.gif" align='center'>
            </nested:equal>
            <nested:notEqual property="reqStatus" value="<%=TapeReelRequest.STAUS_CANCELLED%>">
            <table border='0' cellspacing='0' cellpadding='0' width='90%'  align='center'>
            </nested:notEqual>
                <logic:equal name="isConfirm" value="true">
                <logic:equal name="showMessage" value="TRUE">
                <tr><td colspan="4" align='left'><font class='NArialS' color='blue'><b><%=Constants.NO_MODIFY_RIGHTS %></b></font></td></tr>
                </logic:equal>
				<tr>
					<td colspan='4' align="center">
						<chiptrack:info styleClass="NArialL" />
					</td>	
				</tr>
                <tr>
                    <td colspan='4' align="center">
                        <font class='NArialL'><font color='red'>Are you sure, you want to Confirm this Tape & Reel Request&nbsp;&nbsp;</font></font>
                        <chiptrack:restrictedLink functionality='<%=Functionality.TAPE_REEL_REQUEST %>'
                                                  action='<%=User.USER_ACTION_MODIFY%>' href='javascript:confirmTapeReelRequest();'
                                                  onmouseover="window.status='Confirm this Tape & Reel Request';return true"
                                                  onmouseout="window.status='';return true">
                        <img src='<%=chipTracContext%>/jsp/includes/images/confirm.gif' border='0'>
                        </chiptrack:restrictedLink>
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <a href="javascript:editTapeReelRequest()" onMouseOver="window.status='Click To Edit Tape & Reel Request';return true" onMouseOut="window.status='';return true">
                            <img src='<%=chipTracContext%>/jsp/includes/images/edit.gif' border='0'>
                        </a>
                    </td>
                </tr>
                <tr><td colspan="4"><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20></td></tr>
                </logic:equal>

                <logic:equal name="isClose" value="true">
                <logic:equal name="showMessage" value="TRUE">
                <tr><td colspan="4" align='left'><font class='NArialS' color='blue'><b><%=Constants.NO_MODIFY_RIGHTS %></b></font></td></tr>
                </logic:equal>
                <tr>
                    <td colspan='4' align="center">
                        <font class='NArialL'><font color='red'>Are you sure, you want to  <font color='blue'>Close</font> this Tape & Reel Request&nbsp;&nbsp;</font></font>
                        <chiptrack:restrictedLink functionality='<%=Functionality.TAPE_REEL_REQUEST %>'
                                                  action='<%=User.USER_ACTION_MODIFY%>' href='javascript:closeTapeReelRequest();'
                                                  onmouseover="window.status='Close this Tape & Reel Request';return true"
                                                  onmouseout="window.status='';return true">
                        <img src='<%=chipTracContext%>/jsp/includes/images/confirm.gif' border='0'>
                        </chiptrack:restrictedLink>
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <a href="<%=chipTracContext%>/tapeReelRequest.do" onMouseOver="window.status='Click here to go Search Page';return true" onMouseOut="window.status='';return true">
                            <img src='<%=chipTracContext%>/jsp/includes/images/back.gif' border='0'>
                        </a>
                    </td>
                </tr>
                <tr><td colspan="4"><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20></td></tr>
                </logic:equal>

                <logic:equal name="isCancel" value="true">
                <logic:equal name="showMessage" value="TRUE">
                <tr><td colspan="4" align='left'><font class='NArialS' color='blue'><b><%=Constants.NO_MODIFY_RIGHTS %></b></font></td></tr>
                </logic:equal>
                <tr>
                    <td colspan='4' align="center">
                        <font class='NArialL'><font color='red'>Are you sure, you want to  <font color='blue'>Cancel</font> this Tape & Reel Request&nbsp;&nbsp;</font></font>
                        <chiptrack:restrictedLink functionality='<%=Functionality.TAPE_REEL_REQUEST %>'
                                                  action='<%=User.USER_ACTION_MODIFY%>' href='javascript:cancelTapeReelRequest();'
                                                  onmouseover="window.status='Cancel this Tape & Reel Request';return true"
                                                  onmouseout="window.status='';return true">
                        <img src='<%=chipTracContext%>/jsp/includes/images/confirm.gif' border='0'>
                        </chiptrack:restrictedLink>
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <a href="<%=chipTracContext%>/tapeReelRequest.do" onMouseOver="window.status='Click here to go Search Page';return true" onMouseOut="window.status='';return true">
                            <img src='<%=chipTracContext%>/jsp/includes/images/back.gif' border='0'>
                        </a>
                    </td>
                </tr>
                <tr><td colspan="4"><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20></td></tr>
                </logic:equal>

                <tr>
                    <td valign="top" width="100%">
                        <table border="0" width="100%" align=center>
                            <tr><td colspan=5 class="NArialW" align="center">Tape Reel Request</TD></TR>
                            <tr><td colspan=5>&nbsp;</td></tr>
                            <tr><td colspan=5 class='NArialL'><strong><FONT id="errors" styleClass="NArialL" color='FF0000'></FONT></strong></td></tr>
                            <tr>
                                <td colspan=5>
                                    <chiptrack:errors styleClass="NArialL" />
                                    <chiptrack:messages type="info" styleClass="NArialL" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                  <%--  <table align="center" border="1" width="100%">
                                        <tr>
                                            <td width="10%">&nbsp;</td>
                                            <td width="15%" class="NArialL">&nbsp; WO:</td>
                                            <td width="20%" class="NArialL">
                                                <nested:text property="workOrderNo" size="20" maxlength="50"  styleClass="txfield" disabled="true"/>
                                                <nested:define id="tempStatus" property="reqStatus" />
                                                --%><%--//<bean:write name="tempStatus" />//--%><%--
                                            </td>
                                            <td width="5%">&nbsp;</td>
                                            <td width="15%" class="NArialL">&nbsp;PO:</td>
                                            <td width="20%" class="NArialL">
                                                 <nested:text property="poNumber" size="20" maxlength="50"  styleClass="txfield" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td width="10%">&nbsp;</td>
                                            <td class="NArialL"> TR PartNumber:</td>
                                            <td class="NArialL">
                                                <nested:text property="trPartNumber" size="20" maxlength="50"  styleClass="txfield" disabled="true"/>
                                            </td>
                                            <td class="NArialL">&nbsp;Vendor:</td>
                                            <td class="NArialL">
                                                 <nested:text property="vendor" size="20" maxlength="50"  styleClass="txfield" disabled="true"/>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>&nbsp;</td>
                                            <td class="NArialL">&nbsp; Package:</td>
                                            <td class="NArialL">
                                                <nested:text property="packageType" size="20" maxlength="50"  styleClass="txfield" disabled="true"/>
                                            </td>
                                            <td class="NArialL">&nbsp;Pin Count:</td>
                                            <td class="NArialL">
                                                 <nested:text property="pinCount" size="20" maxlength="50"  styleClass="txfield" disabled="true"/>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>&nbsp;</td>
                                            <td class="NArialL">&nbsp; Reel Qty<font color=red>*</font>:</td>
                                            <td class="NArialL">
                                                <nested:text property="reelQty" size="20" maxlength="50" styleClass="valuetxfield" onkeypress="javascript:numcheck()"  disabled="true"/>
                                            </td>
                                            <td class="NArialL">&nbsp;</td>
                                            <td class="NArialL">&nbsp;</td>
                                        </tr>
                                        <tr>
                                            <td>&nbsp;</td>
                                            <td class="NArialL">&nbsp; Req Qty<font color=red>*</font>:</td>
                                            <td class="NArialL">
                                                <nested:text property="reqQty" size="20" maxlength="50" styleClass="valuetxfield" onkeypress="javascript:numcheck()" disabled="true"/>
                                            </td>
                                            <td class="NArialL">&nbsp; Req Date<font color=red>*</font></td>
                                            <td class="NArialL">
                                                 <nested:text property="reqDate" size="20" maxlength="50" styleClass="txfield"  disabled="true"/>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>&nbsp;</td>
                                            <td class="NArialL">&nbsp; Exp Comp Date:</td>
                                            <td class="NArialL">
                                                <nested:text property="expCompDate" size="20" maxlength="50" styleClass="txfield"  disabled="true"/>
                                            </td>
											<logic:equal name="tempStatus" value="Pulled">	
												<td class="NArialL">&nbsp; Actual Comp Date</td>
												<td class="NArialL">
													 <nested:text property="actualCompDate" size="20" maxlength="50" styleClass="txfield"  disabled="true"/>
												</td>
											</logic:equal>
											<logic:equal name="tempStatus" value="Closed">	
												<td class="NArialL">&nbsp; Actual Comp Date</td>
												<td class="NArialL">
													 <nested:text property="actualCompDate" size="20" maxlength="50" styleClass="txfield"  disabled="true"/>
												</td>
											</logic:equal>
											<logic:notEqual name="tempStatus" value="Closed">	
												<logic:notEqual name="tempStatus" value="Pulled">
													<td class="NArialL">&nbsp;</td>
													<td class="NArialL">
														 <nested:hidden property="actualCompDate"/>
													</td>
												</logic:notEqual>
											</logic:notEqual>

                                        </tr>
                                        <tr>
                                            <td colspan="5"><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20></td>
                                        </tr>

                                        <tr>
                                            <td>&nbsp;</td>
                                            <td class="NArialL"><font class="NArialL">&nbsp; Special Instructions:</font></td>
                                            <td colspan="3">
                                                <nested:textarea property="specialInstructions" onkeypress="javascript:checkLength(this, 1000)" styleClass="txfield" rows="5" cols="115" disabled="true"/>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="5"><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20></td>
                                        </tr>
                                        <tr>
                                            <td>&nbsp;</td>
                                            <td class="NArialL"><font class="NArialL">&nbsp; Comments:</font></td>
                                            <td colspan="3">
                                                <nested:textarea property="comments" onkeypress="javascript:checkLength(this, 1000)" styleClass="txfield" rows="5" cols="115" disabled="true"/>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="5"><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20></td>
                                        </tr>
                                        <tr>
                                            <td colspan='5'>
                                                <table width="80%" align="center" cellpadding="2" cellspacing="2" border="0">
                                                    <tr>
                                                        <td colspan="2"><font class="NArialL">&nbsp; Vendor Contact Persons :</font></td>
                                                     </tr>
                                                    <tr>
                                                        <td width="20%" class="NArialL" bgcolor="#993333" nowrap align="center">
                                                            <font color="#FFFFFF">Name</font>
                                                        </td>
                                                        <td width="20%" class="NArialL" bgcolor="#993333" nowrap align="center">
                                                            <FONT COLOR="#FFFFFF">EMail</FONT>
                                                        </td>
                                                     </tr>
                                                    <nested:iterate property="vendorContactPersonsList" type="com.scalar.chiptrack.operations.release.ContactPerson" id="contactPerson" indexId="emilIteratorIdx">
                                                        <tr <%if(emilIteratorIdx.intValue()%2==0){%> bgcolor='#DEE1E2' <% } else {%> bgcolor='#FFFFEE' <%}%>>
                                                             <td width="20%" class="NArialL" align="center" nowrap>
                                                                <nested:write property="name"/>
                                                                <nested:hidden property="name"/>
                                                            </td>
                                                            <td width="20%" class="NArialL" align="center" nowrap>
                                                                <nested:write property="email"/>
                                                                <nested:hidden property="email"/>
                                                            </td>
                                                    </nested:iterate>
                                                 </TABLE>
                                            </td>
                                        </tr>
                                         <tr>
                                            <td colspan="5"><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20></td>
                                        </tr>
                                       <tr>
                                            <td colspan='5'>
                                                <table width="80%" align="center" cellpadding="2" cellspacing="2" border="0">
                                                    <tr>
                                                        <td colspan="2"><font class="NArialL">&nbsp; Internal Contact Persons :</font></td>
                                                     </tr>
                                                    <tr>
                                                        <td width="20%" class="NArialL" bgcolor="#993333" nowrap align="center">
                                                            <font color="#FFFFFF">Name</font>
                                                        </td>
                                                        <td width="20%" class="NArialL" bgcolor="#993333" nowrap align="center">
                                                            <FONT COLOR="#FFFFFF">EMail</FONT>
                                                        </td>
                                                     </tr>
                                                    <nested:iterate property="contactPersonsList" type="com.scalar.chiptrack.operations.release.ContactPerson" id="contactPerson" indexId="emilIteratorIdx">
                                                        <tr <%if(emilIteratorIdx.intValue()%2==0){%> bgcolor='#DEE1E2' <% } else {%> bgcolor='#FFFFEE' <%}%>>
                                                             <td width="20%" class="NArialL" align="center" nowrap>
                                                                <nested:write property="name"/>
                                                                <nested:hidden property="name"/>
                                                            </td>
                                                            <td width="20%" class="NArialL" align="center" nowrap>
                                                                <nested:write property="email"/>
                                                                <nested:hidden property="email"/>
                                                            </td>
                                                    </nested:iterate>
                                                 </TABLE>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="4"><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20></td>
                                        </tr>
                                        <logic:notEqual name="tempStatus" value="Create">
                                        <tr>
                                            <td colspan='5'>
                                                <table width="90%" align="center" cellpadding="2" cellspacing="2" border="0">
                                                    <tr>
                                                        <td colspan="8"><font class="NArialL">&nbsp; Lot Info:</font></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="3%" class="NArialL" bgcolor="#993333" nowrap align="center">
                                                            <font color="#FFFFFF">Select</font>
                                                        </td>
                                                        <td width="20%" class="NArialL" bgcolor="#993333" nowrap align="center">
                                                            <font color="#FFFFFF">FG Part Number</font>
                                                        </td>
                                                        <td width="20%" class="NArialL" bgcolor="#993333" nowrap align="center">
                                                            <font color="#FFFFFF">Lot Number</font>
                                                        </td>
                                                        <td width="10%" class="NArialL" bgcolor="#993333" nowrap align="center">
                                                            <font color="#FFFFFF">Qty Available</font>
                                                        </td>
                                                        <logic:notEqual name="tempStatus" value="Issued">
															<td width="10%" class="NArialL" bgcolor="#993333" nowrap align="center">
																<font color="#FFFFFF">Qty Pulled</font>
															</td>
															<td width="10%" class="NArialL" bgcolor="#993333" nowrap align="center">
																<font color="#FFFFFF">T&R Qty</font>
															</td>
															<td width="10%" class="NArialL" bgcolor="#993333" nowrap align="center">
																<font color="#FFFFFF">Return Qty</font>
															</td>
															<td width="10%" class="NArialL" bgcolor="#993333" nowrap align="center">
																<font color="#FFFFFF">Reject Qty</font>
															</td>
                                                        </logic:notEqual>
                                                        <logic:equal name="tempStatus" value="Issued">
															<td colspan="3" width="10%" class="NArialL" bgcolor="#993333" nowrap align="center">
																<font color="#FFFFFF">Qty Pulled</font>
															</td>
                                                        </logic:equal>
                                                    </tr>
                                                    <%	int totalTrQty = 0;
                                                        int totalPulledQty = 0;
                                                        int totalReturnQty = 0;
														int totalRejectQty = 0;
                                                    %>
                                                    <nested:iterate property="lotList" type="com.scalar.chiptrack.operations.tapereel.TapeReelRequestLot" id="tapereelRequestLot" indexId="iteratorIdx">
                                                        <tr <%if(iteratorIdx.intValue()%2==0){%> bgcolor='#DEE1E2' <% } else {%> bgcolor='#FFFFEE' <%}%>>
                                                             <%
                                                             String jsFuntion = "setSelectAllIds(this," + iteratorIdx + ");calculateRunningTotal();";
                                                             %>
                                                            <td width="3%" align="center" class='NArialL'>
                                                                <nested:checkbox property="checked" onclick="<%=jsFuntion%>" disabled="true"/>
                                                            </td>
                                                             <td width="20%" class="NArialL" nowrap>
                                                                <nested:write property="partNumber"/>
                                                                <nested:hidden property="partNumber"/>
                                                            </td>
                                                            <td width="20%" class="NArialL" nowrap>
                                                                <nested:write property="lotNumber"/>
                                                                <nested:hidden property="lotNumber"/>
                                                            </td>
                                                            <td width="20%" align='right' class="NArialL">
                                                                <nested:write property="availableQty"/>
                                                            </td>
                                                            <logic:notEqual name="tempStatus" value="Issued">
																<td width="10%" align='right' class="NArialL">
																	<nested:text property="pulledQty" onkeypress="javascript:numcheck()"  onkeyup="calculateRunningTotal()" styleClass="valuetxfield" disabled="true" maxlength="7"/>
																</td>
																<td width="10%" align='right' class="NArialL">
																	<nested:text property="trQty" onkeypress="javascript:numcheck()" onkeyup="calculateRunningTotal()" styleClass="valuetxfield" disabled="true" maxlength="7"/>
																</td>
																<td width="10%" align='right' class="NArialL">
																	<nested:text property="returnQty" onkeypress="javascript:numcheck()" onkeyup="calculateRunningTotal()" styleClass="valuetxfield" disabled="true" maxlength="7"/>
																</td>
																<td width="10%" align='right' class="NArialL">
																	<nested:text property="rejectQty" onkeypress="javascript:numcheck()" onkeyup="calculateRunningTotal()" styleClass="valuetxfield" disabled="true" maxlength="7"/>
																</td>
                                                            </logic:notEqual>
                                                            <logic:equal name="tempStatus" value="Issued">
																<td colspan="3" width="10%" align='right' class="NArialL">
																	<nested:text property="pulledQty" onkeypress="javascript:numcheck()"  onkeyup="calculateRunningTotal()" styleClass="valuetxfield" disabled="true" maxlength="7"/>
																	<nested:hidden property="returnQty"/>
																	<nested:hidden property="trQty"/>
																	<nested:hidden property="rejectQty"/>
	                                                            </td>
                                                            </logic:equal>
                                                            <nested:hidden property="availableQty"/>
                                                            <nested:hidden property="lotId"/>
                                                        </tr>
                                                        <%
                                                            totalTrQty += tapereelRequestLot.getTrQty();
                                                            totalPulledQty += tapereelRequestLot.getPulledQty();
                                                            totalReturnQty += tapereelRequestLot.getReturnQty();
															totalRejectQty += tapereelRequestLot.getRejectQty();	
                                                        %>
                                                    </nested:iterate>
                                                    <tr>
                                                        <td>&nbsp;</td>
                                                        <td>&nbsp;</td>
                                                        <td>&nbsp;</td>
                                                        <td class="NArialL">Running Totals:</td>
                                                        <logic:notEqual name="tempStatus" value="Issued">
                                                            <td><input type="text" name="runningTotalPulledQty" class="valuetxfield" value="<%=totalPulledQty%>" disabled="true"></td>
                                                            <td><input type="text" name="runningTotalTRQty" class="valuetxfield" value="<%=totalTrQty%>" disabled="true"></td>
                                                            <td><input type="text" name="runningTotalReturnQty" class="valuetxfield" value="<%=totalReturnQty%>" disabled="true"></td>
															<td><input type="text" name="runningTotalRejectQty" class="valuetxfield" value="<%=totalRejectQty%>" disabled="true"></td>

                                                        </logic:notEqual>
                                                        <logic:equal name="tempStatus" value="Issued">
                                                            <td colspan="3">
                                                                <input type="text" name="runningTotalPulledQty" class="valuetxfield" value="<%=totalPulledQty%>" disabled="true">
                                                                <input type="hidden" name="runningTotalTRQty" value="<%=totalTrQty%>" disabled="true">
                                                                <input type="hidden" name="runningTotalReturnQty" value="<%=totalReturnQty%>" disabled="true">
																<input type="hidden" name="runningTotalRejectQty" value="<%=totalRejectQty%>" disabled="true">
                                                            </td>
                                                        </logic:equal>
                                                    </tr>
                                                    <nested:size property="lotList" id="lotListSize"/>
                                                    <SCRIPT>
                                                        lotNumberListSize = <%=lotListSize%>;
                                                    </SCRIPT>
                                                </table>
                                            </td>
                                        </tr>
                                        </logic:notEqual>
                                        <tr>
                                            <td colspan="8"><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20></td>
                                        </tr>
                                    </TABLE>--%>
                           <table align="center" border="1" width="100%">
                            <tr>
                                <td width="10%">&nbsp;</td>
                                <td width="15%" class="NArialL"> WO:</td>
                                <td width="20%" class="NArialL">
                                    <nested:text property="workOrderNo" size="20" maxlength="50"  styleClass="txfield" disabled="true"/>
                                    <nested:define id="tempStatus" property="reqStatus" />
                                   <!-- <bean:write name="tempStatus" /> -->
                                </td>
                                <td width="5%">&nbsp;</td>
                                <td width="15%" class="NArialL">PO:</td>
                                <td width="20%" class="NArialL">
                                     <nested:text property="poNumber" size="20" maxlength="50"  styleClass="txfield" disabled="true"/>
                                </td>
                            </tr>
                            <tr>
                                <td width="10%">&nbsp;</td>
                                <td width="15%" class="NArialL"> TR Part Number :</td>
                                <td width="20%" class="NArialL">
                                    <nested:text property="trPartNumber" size="20" maxlength="50"  styleClass="txfield" disabled="true"/>
                                </td>
                                <td width="5%">&nbsp;</td>
                                <td width="15%" class="NArialL"> Vendor :</td>
                                <td width="20%" class="NArialL">
                                     <nested:text property="vendor" size="20" maxlength="50"  styleClass="txfield" disabled="true"/>
                                </td>
                            </tr>
                            <tr>
                                <td width="10%">&nbsp;</td>
                                <td width="15%" class="NArialL"> Package : </td>
                                <td width="20%" class="NArialL">
                                    <nested:text property="packageType" size="20" maxlength="50"  styleClass="txfield" disabled="true" />
                                </td>
                                <td width="5%">&nbsp;</td>
                                <td width="15%" class="NArialL"> Pin Count : </td>
                                <td width="20%" class="NArialL">
                                     <nested:text property="pinCount" size="20" maxlength="50"  styleClass="txfield" disabled="true" />
                                </td>
                            </tr>
                            <tr>
                                <td width="10%" >&nbsp;</td>
                                <td width="15%" class="NArialL"> Reel Qty<font color=red>*</font> : </td>
                                <td width="20%" class="NArialL">
                                    <nested:text property="reelQty" size="20" maxlength="50" styleClass="valuetxfield" onkeypress="javascript:numcheck()" disabled="true"/>
                                </td>
                                <td width="5%">&nbsp;</td>
                                <td width="15%" class="NArialL">&nbsp;</td>
                                <td width="20%" class="NArialL">&nbsp;</td>
                            </tr>
                            <tr>
                                <td width="10%" >&nbsp;</td>
                                <td width="15%" class="NArialL"> Req Qty<font color=red>*</font> : </td>
                                <td width="20%" class="NArialL">
                                    <nested:text property="reqQty" size="20" maxlength="50" styleClass="valuetxfield" onkeypress="javascript:numcheck()" disabled="true"/>
                                </td>
                                <td width="5%">&nbsp;</td>
                                <td width="15%" class="NArialL"> Req Date : <font color=red>*</font></td>
                                <td width="20%" class="NArialL">
                                     <nested:text property="reqDate" size="20" maxlength="50" styleClass="txfield" disabled="true"/>
                                </td>
                            </tr>
                            <tr>
                                <td width="10%" >&nbsp;</td>
                                <td width="15%" class="NArialL"> Exp Comp Date : </td>
                                <td width="20%" class="NArialL">
                                    <nested:text property="expCompDate" size="20" maxlength="50" styleClass="txfield" disabled="true"/>
                                </td>
                                <td width="5%">&nbsp;</td>
                                 <logic:equal name="tempStatus" value="Pulled">
									<td width="15%" class="NArialL"> Actual Comp Date :</td>
									<td width="20%" class="NArialL">
										 <nested:text property="actualCompDate" size="20" maxlength="50" styleClass="txfield" disabled="true"/>
									</td>
								</logic:equal>
 								<logic:equal name="tempStatus" value="Closed">
									<td width="15%" class="NArialL"> Actual Comp Date : </td>
									<td width="20%" class="NArialL">
										 <nested:text property="actualCompDate" size="20" maxlength="50" styleClass="txfield" disabled="true"/>
									</td>
								</logic:equal>
								<logic:notEqual name="tempStatus" value="Pulled">
									<logic:notEqual name="tempStatus" value="Closed">
										<td width="15%" class="NArialL">&nbsp; </td>
										<td width="20%"class="NArialL">
											 <nested:hidden property="actualCompDate"/>
										</td>
									</logic:notEqual>
								</logic:notEqual>
                            </tr>
                            <tr>
                                <td colspan="6"><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20></td>
                            </tr>

                            <tr>
                                <td width="5%" >&nbsp;</td>
                                <td width="15%" class="NArialL">
                                <font class="NArialL"> Special Instructions : </font></td>
                                <td colspan="4" >
                                    <nested:textarea property="specialInstructions" onkeypress="javascript:checkLength(this, 1000)" styleClass="txfield" rows="5" cols="80" disabled="true"/>
                                </td>                                                                                                                                       
                            </tr>
                            <tr>
                                <td colspan="6"><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20></td>
                            </tr>
                            <tr>
                                <td width="10%" >&nbsp;</td>
                                <td width="15%" class="NArialL">Comments :</td>
                                <td colspan="4">
                                    <nested:textarea property="comments" onkeypress="javascript:checkLength(this, 1000)" styleClass="txfield" rows="5" cols="80" disabled="true"/>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="6"><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20></td>
                            </tr>
                            <tr>
                                <td colspan='6'>
                                    <table width="78%" align="center" cellpadding="2" cellspacing="2" border="0">
                                        <tr>
                                            <td colspan="2"><font class="NArialL">Vendor Contact Persons :</font></td>
                                         </tr>
                                        <tr>
                                            <td width="20%" class="NArialL" bgcolor="#993333" nowrap align="center">
                                                <font color="#FFFFFF">Name</font>
                                            </td>
                                            <td width="20%" class="NArialL" bgcolor="#993333" nowrap align="center">
                                                <FONT COLOR="#FFFFFF">EMail</FONT>
                                            </td>
                                         </tr>
                                        <nested:iterate property="vendorContactPersonsList" type="com.scalar.chiptrack.operations.release.ContactPerson" id="contactPerson" indexId="emilIteratorIdx">
                                            <tr <%if(emilIteratorIdx.intValue()%2==0){%> bgcolor='#DEE1E2' <% } else {%> bgcolor='#FFFFEE' <%}%>>
                                                 <td width="20%" class="NArialL" align="center" nowrap>
                                                    <nested:write property="name"/>
                                                    <nested:hidden property="name"/>
                                                </td>
                                                <td width="20%" class="NArialL" align="center" nowrap>
                                                    <nested:write property="email"/>
                                                    <nested:hidden property="email"/>
                                                </td>
                                        </nested:iterate>
                                     </TABLE>
                                </td>
                             </tr>
                             <tr>
                                <td colspan="5"><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20></td>
                            </tr>
                             <tr>
                                <td colspan='6'>
                                    <table width="78%" align="center" cellpadding="2" cellspacing="2" border="0">
                                        <tr>
                                            <td colspan="2"><font class="NArialL">&nbsp; Internal Contact Persons :</font></td>
                                         </tr>
                                        <tr>
                                            <td width="20%" class="NArialL" bgcolor="#993333" nowrap align="center">
                                                <font color="#FFFFFF">Name</font>
                                            </td>
                                            <td width="20%" class="NArialL" bgcolor="#993333" nowrap align="center">
                                                <FONT COLOR="#FFFFFF">EMail</FONT>
                                            </td>
                                         </tr>
                                        <nested:iterate property="contactPersonsList" type="com.scalar.chiptrack.operations.release.ContactPerson" id="contactPerson" indexId="emilIteratorIdx">
                                            <tr <%if(emilIteratorIdx.intValue()%2==0){%> bgcolor='#DEE1E2' <% } else {%> bgcolor='#FFFFEE' <%}%>>
                                                 <td width="20%" class="NArialL" align="center" nowrap>
                                                    <nested:write property="name"/>
                                                    <nested:hidden property="name"/>
                                                </td>
                                                <td width="20%" class="NArialL" align="center" nowrap>
                                                    <nested:write property="email"/>
                                                    <nested:hidden property="email"/>
                                                </td>
                                        </nested:iterate>
                                     </TABLE>
                                </td>
                             </tr>
                            <tr>
                                <td colspan="5"><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20></td>
                            </tr>
                            <logic:notEqual name="tempStatus" value="Create">
                            <tr>
                                <td colspan='6'>
                                    <table width="80%" align="center" cellpadding="2" cellspacing="2" border="0">
                                        <tr>
                                            <td colspan="7"><font class="NArialL">&nbsp; Lot Info:</font></td>
                                        </tr>
                                        <tr>
                                            <td width="3%" class="NArialL" bgcolor="#993333" nowrap align="center">
                                                <font color="#FFFFFF">Select</font>
                                            </td>
                                            <td width="20%" class="NArialL" bgcolor="#993333" nowrap align="center">
                                                <font color="#FFFFFF">FG Part Number</font>
                                            </td>
                                            <td width="20%" class="NArialL" bgcolor="#993333" nowrap align="center">
                                                <font color="#FFFFFF">Lot Number</font>
                                            </td>
                                            <td width="10%" class="NArialL" bgcolor="#993333" nowrap align="center">
                                                <font color="#FFFFFF">Qty Available</font>
                                            </td>
                                            <logic:notEqual name="tempStatus" value="Issued">
                                            <td width="10%" class="NArialL" bgcolor="#993333" nowrap align="center">
                                                <font color="#FFFFFF">Qty Pulled</font>
                                            </td>
                                            <td width="10%" class="NArialL" bgcolor="#993333" nowrap align="center">
                                                <font color="#FFFFFF">T&R Qty</font>
                                            </td>
                                            <td width="10%" class="NArialL" bgcolor="#993333" nowrap align="center">
                                                <font color="#FFFFFF">Return Qty</font>
                                            </td>
											<td width="10%" class="NArialL" bgcolor="#993333" nowrap align="center">
                                                <font color="#FFFFFF">Reject Qty</font>
                                            </td>
                                            </logic:notEqual>
                                            <logic:equal name="tempStatus" value="Issued">
                                            <td colspan="3" width="10%" class="NArialL" bgcolor="#993333" nowrap align="center">
                                                <font color="#FFFFFF">Qty Pulled</font>
                                            </td>
                                            </logic:equal>
                                        </tr>
                                        <%	int totalTrQty = 0;
                                            int totalPulledQty = 0;
                                            int totalReturnQty = 0;
											int totalRejectQty = 0;
                                        %>
                                        <nested:iterate property="lotList" type="com.scalar.chiptrack.operations.tapereel.TapeReelRequestLot" id="tapereelRequestLot" indexId="iteratorIdx">
                                            <tr <%if(iteratorIdx.intValue()%2==0){%> bgcolor='#DEE1E2' <% } else {%> bgcolor='#FFFFEE' <%}%>>
                                                 <%
                                                 String jsFuntion = "setSelectAllIds(this," + iteratorIdx + ");calculateRunningTotal();";
                                                 %>
                                                <td width="3%" align="center" class='NArialL'>
                                                    <nested:checkbox property="checked" onclick="<%=jsFuntion%>" disabled="true"/>
                                                </td>
                                                 <td width="20%" class="NArialL" nowrap>
                                                    <nested:write property="partNumber"/>
                                                    <nested:hidden property="partNumber"/>
                                                </td>
                                                <td width="20%" class="NArialL" nowrap>
                                                    <nested:write property="lotNumber"/>
                                                    <nested:hidden property="lotNumber"/>
                                                </td>
                                                <td width="20%" align='right' class="NArialL">
                                                    <nested:write property="availableQty"/>
                                                </td>
                                                <logic:notEqual name="tempStatus" value="Issued">
													<td width="10%" align='right' class="NArialL">
														<nested:equal property="checked" value="true">
															<nested:text property="pulledQty" onkeypress="javascript:numcheck()" onkeyup="calculateRunningTotal()" styleClass="valuetxfield" maxlength="7" disabled="true"/>
														</nested:equal>
														<nested:notEqual property="checked" value="true">
															<nested:text property="pulledQty" onkeypress="javascript:numcheck()"  onkeyup="calculateRunningTotal()" styleClass="valuetxfield" disabled="true" maxlength="7" />
														</nested:notEqual>
													</td>
													<td width="10%" align='right' class="NArialL">
														<nested:equal property="checked" value="true">
															<nested:text property="trQty" onkeypress="javascript:numcheck()" onkeyup="calculateRunningTotal()" styleClass="valuetxfield" maxlength="7" disabled="true"/>
														</nested:equal>
														<nested:notEqual property="checked" value="true">
															<nested:text property="trQty" onkeypress="javascript:numcheck()" onkeyup="calculateRunningTotal()" styleClass="valuetxfield" disabled="true" maxlength="7"/>
														</nested:notEqual>
													</td>
													<td width="10%" align='right' class="NArialL">
														<nested:equal property="checked" value="true">
															<nested:text property="returnQty" onkeypress="javascript:numcheck()" onkeyup="calculateRunningTotal()" styleClass="valuetxfield" maxlength="7" disabled="true"/>
														</nested:equal>
														<nested:notEqual property="checked" value="true">
															<nested:text property="returnQty" onkeypress="javascript:numcheck()" onkeyup="calculateRunningTotal()" styleClass="valuetxfield" disabled="true" maxlength="7"/>
														</nested:notEqual>
													</td>
													<td width="10%" align='right' class="NArialL">
														<nested:equal property="checked" value="true">
															<nested:text property="rejectQty" onkeypress="javascript:numcheck()" onkeyup="calculateRunningTotal()" styleClass="valuetxfield" maxlength="7"disabled="true" />
														</nested:equal>
														<nested:notEqual property="checked" value="true">
															<nested:text property="rejectQty" onkeypress="javascript:numcheck()" onkeyup="calculateRunningTotal()" styleClass="valuetxfield" disabled="true" maxlength="7"/>
														</nested:notEqual>
													</td>
                                                </logic:notEqual>

                                                <logic:equal name="tempStatus" value="Issued">
													<td colspan="3" width="10%" align='right' class="NArialL">
														<nested:equal property="checked" value="true">
															<nested:text property="pulledQty" onkeypress="javascript:numcheck()" onkeyup="calculateRunningTotal()" styleClass="valuetxfield" maxlength="7" disabled="true"/>
														</nested:equal>
														<nested:notEqual property="checked" value="true">
															<nested:text property="pulledQty" onkeypress="javascript:numcheck()"  onkeyup="calculateRunningTotal()" styleClass="valuetxfield" disabled="true" maxlength="7" />
														</nested:notEqual>
														<nested:hidden property="returnQty"/>
														<nested:hidden property="trQty"/>
														<nested:hidden property="rejectQty"/>
													</td>
                                                </logic:equal>
                                                <nested:hidden property="availableQty"/>
                                                <nested:hidden property="lotId"/>
                                            </tr>
                                            <%
                                                totalTrQty += tapereelRequestLot.getTrQty();
                                                totalPulledQty += tapereelRequestLot.getPulledQty();
                                                totalReturnQty += tapereelRequestLot.getReturnQty();
												totalRejectQty += tapereelRequestLot.getRejectQty();
                                            %>
                                        </nested:iterate>
                                        <tr>
                                            <td>&nbsp;</td>
                                            <td>&nbsp;</td>
                                            <td>&nbsp;</td>
                                            <td class="NArialL">Running Totals:</td>
                                            <logic:notEqual name="tempStatus" value="Issued">
                                                <td><input type="text" name="runningTotalPulledQty" class="valuetxfield" value="<%=totalPulledQty%>" disabled="true"></td>
                                                <td><input type="text" name="runningTotalTRQty" class="valuetxfield" value="<%=totalTrQty%>" disabled="true"></td>
                                                <td><input type="text" name="runningTotalReturnQty" class="valuetxfield" value="<%=totalReturnQty%>" disabled="true"></td>
												<td><input type="text" name="runningTotalRejectQty" class="valuetxfield" value="<%=totalRejectQty%>" disabled="true"></td>
                                            </logic:notEqual>
                                            <logic:equal name="tempStatus" value="Issued">
                                                <td colspan="3">
                                                    <input type="text" name="runningTotalPulledQty" class="valuetxfield" value="<%=totalPulledQty%>" disabled="true">
                                                    <input type="hidden" name="runningTotalTRQty" value="<%=totalTrQty%>" disabled="true">
                                                    <input type="hidden" name="runningTotalReturnQty" value="<%=totalReturnQty%>" disabled="true">
													<input type="hidden" name="runningTotalRejectQty" value="<%=totalRejectQty%>" disabled="true">
                                                </td>
                                            </logic:equal>
                                        </tr>
                                        <nested:size property="lotList" id="lotListSize"/>
                                        <SCRIPT>
                                            lotNumberListSize = <%=lotListSize%>;
                                        </SCRIPT>
                                    </table>
                                </td>
                            </tr>
                            </logic:notEqual>
                            <tr>
                                <td colspan="6"><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20></td>
                            </tr>

                        </TABLE>
                                </td>
                            </tr>
                        </TABLE>
                    </td>
                    </nested:nest>
                    </html:form>
                </tr>
            </TABLE>
        </tr>
    </TABLE>
    <!-- Footer starts here -->
    <%@ include file="/jsp/includes/footer.jsp" %>
    <!-- footer end here -->
</BODY>
</HTML>
